
let arr = [1,2,3]
for(let a of arr) {
    // console.log(a)
}


let sarr = ["a","b","c","d","e","f"]
sarr.forEach((val, idx, array) => {
    // val: 当前值
    // idx：当前index
    // array: Array
    //console.log(val) //a , b , c , d , e, f
    //console.log(idx) //1,2,3,4,5...
    // console.log(array)
});

sarr.every((val, idx, array) => {
    // val: 当前值
    // idx：当前index
    // array: Array
    console.log(val) //a , b , c , d , e, f
    console.log(idx) //1,2,3,4,5...
    return true; // Continues
    // Return false will quit the iteration
});

